@import '~@/style/base.less';

// .head_wrap,
.head_hidden,
.head_main {
  height: @header_height;
  flex: 0 0 auto;
}

.head_wrap.lg_height {
  height: @head_height_Lg;
  .head_hidden,
  .head_main {
    height: @head_height_Lg;
  }
}

.head_main {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: #fff;
  // .themeBg();
  &.store {
    // background: @color_theme;
    .head_back {
      background-image: url('~@/assets/images/go_back_white.png');
    }
    .head_share {
      background-image: url('~@/assets/images/store_share.png');
    }
  }
  &.border {
    border-bottom: 1px solid #e9edee;
  }
}

.head_title {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  margin: 0;
  flex: 1 1 100%;
  font-weight: bold;
  color: @color_text;
  font-size: 32px;
  transition: 0.5s;
  transition-property: opacity;
}

.head_left_extra {
  flex: 0 0 auto;
  position: absolute;
  transition: 0.5s;
  transition-property: opacity;
  padding-left: 50px;
}

.head_middle {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.5s;
  transition-property: opacity;
}

.head_back {
  position: relative;
  z-index: 2;
  display: block;
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 50px auto;
  font-size: 0;
  color: transparent;
  transition: 0.5s;
  transition-property: opacity;
}
.head_share {
  flex: 0 0 50px;
  width: 50px;
  height: 60px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px auto;
  font-size: 12px;
  padding-top: 46px;
  text-align: center;
}

.head_back {
  background-image: url('~@/assets/images/go_back.png');
  background-size: 19px auto;
  background-position: 0 center;
}

.search_wrap {
  position: absolute;
  z-index: 2;
  right: 0;
  display: flex;
  align-items: center;
  padding: 0 32px;
  width: 112px;
  overflow: hidden;
  transition: 0.5s;
  transition-property: width;
  color: @color_text;
  .icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    background: url('~@/assets/images/shop_sreach@2x.png') center no-repeat;
    background-size: 37px;
    position: relative;
  }
  .search {
    display: flex;
    flex: 1 1 auto;
    width: auto;
    overflow: hidden;
  }
  .input_wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    margin: 0 28px 0 0;
    border-radius: 16px;
    background: @color_search_bg;
    padding: 0 8px 0 30px;
  }
  .input {
    flex: 1 1 auto;
    width: 0;
    border: 0;
    height: 50px;
    font-size: 24px;
    margin: 0 20px 0 0;
    background: none;
    color: @color_text;
  }
  .input_clear {
    flex: 0 0 auto;
    width: 42px;
    height: 54px;
    // background: url('@{imgUrl}/registered_close@2x.png') center no-repeat;
    background-size: 42px auto;
    font-size: 0;
  }
  .button {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    text-align: right;
  }
}

.head_main.active {
  .head_back,
  .head_title,
  .head_left_extra,
  .head_middle,
  .head_share {
    opacity: 0;
  }
  .search_wrap {
    width: 100%;
    .icon {
      left: -16px;
    }
    .head_back {
      opacity: 1;
    }
  }
}
